package com.basin.common.glc.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * @author: Sam ZHONG | sammy1997@aliyun.com
 * @date: 2025/6/21 18:13
 * @description:
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class BasinLogVO implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;

    private String traceId;
    private String logId;
    private String requestUri;
    private Object params;
    private Object result;
    private Map<String, String> headers;
    private long startTime;
    private long endTime;
    private long costTime;
    private boolean success;
    private Integer errorCode;
    private String errorMsg;
    private StackTraceElement[] stackTrace;
    // todo 这种东西感觉没必要 因为MDC已经做了traceId一致了，捞回来根据这个值也能匹配
    // todo 顺序问题 可以用traceId 去申请logId 然后在这个形式上去做顺序
    private List<BasinLogVO> traces = new ArrayList<BasinLogVO>();
}
